package com.doit.day03.不可变集合

object _07_小练习 {
  def main(args: Array[String]): Unit = {
    //我给你一个数组，数组里面有一行行得句子
    val arr1: Array[String] = Array("hello,siyi,siyi,hello", "hanhan,hi,hi,hanhan", "ting,gun,gun,ting")
    //现在要求你,将上面得数组转变成 Array("hello","siyi","siyi","hello","hanhan".....)
    val arr2: Array[Array[String]] = arr1.map(_.split(","))
    val res: Array[String] = arr2.flatten
    res.foreach(println)



  }

}
